<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String caption=(String) application.getAttribute("caption");
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员登陆|<%=caption %></title>
<%
	String username=null;
	String cookiename=(String) application.getAttribute("cookiename");
	String homelink=(String) application.getAttribute("homelink");
	Cookie[] c=request.getCookies();
	if(c!=null){
		int len=c.length;
		boolean flag=false;
		for(int i=0;i<len;++i){
			if(c[i].getName().equals(cookiename+"-admin")==true){
				username=c[i].getValue();
				flag=true;
			}
		}
		if(flag==true) response.sendRedirect("./index.jsp");
	}
%>
<script type="text/javascript" src="./login.js"></script>
</head>
<body>
<center>
<jsp:include page="../common/header.jsp"></jsp:include>
管理员登陆
<table>
	<tr>
		<td>用户名:</td>
		<td><input type="text" id="username" name="username" style="width: 350px;" /></td>
	</tr>
	<tr>
		<td>密码:</td>
		<td><input type="password" id="password" name="password" style="width: 350px;" /></td>
	</tr>
	<tr>
		<td colspan="2"><center><button onclick="login()">登陆</button>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<button onclick="redo()">重置</button></center></td>
	</tr>
	</table>
</center>
</body>
</html>